import React from 'react'
import ReactDOM from 'react-dom/client'
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import store from "./store/store.js"
import {Provider} from "react-redux";
import Index from "./routes/Index.jsx";
import Hello from "./routes/Hello.jsx";
import Test from "./routes/Test.jsx";

const router = createBrowserRouter([
    {
        path: "/",
        element: <Index/>
    },
    {
        path: "/hello/:id",
        element: <Hello/>
    },
    {
        path: "/test/:id",
        element: <Test/>
    }
])

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
      <Provider store={store}>
          <RouterProvider router={router}/>
      </Provider>
  </React.StrictMode>,
)
